Xbasic

EXPRESSION_SUBEXPRESSION_ELIMINATE Function

Syntax

New_Expression as C = EXPRESSION_SUBEXPRESSION_ELIMINATE( C expression, C subexpression)

Arguments

expression

An expression.

subexpression

An expression contained within Expression.

Description

Remove any occurence of the subexpression from an expression - removes any intervening operators as well.

Discussion

EXPRESSION_SUBEXPRESSION_ELIMINATE() returns a character string by removing any occurrence of the Sub_Expression from the Expression. In doing so, the function eliminates any intervening operators.

Example

short = "x + y"
long = "x + y + z "
expression_subexpression_eliminate(long,short) -> "z"

See Also